﻿using SkiaAndModel.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SkiaAndModel.NodeAbstract
{
    public class VirtualNode : INode
    {
        public string Name { get; set; } = "VN";
        public Guid Id { get; set; } = Guid.NewGuid();
        public NodeType NodeType { get; set; } = NodeType.VirtualNode;
        public ObservableCollection<PathNodeBase> Children { get; set; } = new ObservableCollection<PathNodeBase>();

        public int GetHeight()
        {
            //int height = NextNode.GetHeight();
            //foreach (var node in Children) {
            //    height += node.GetHeight();
            //}
            //if (this.NextNode == null)
            //{
            //    return height;
            //}
            //else
            //{
            //    return new List<int>() { this.NextNode.GetHeight(), height }.Max();
            //}
            return 0;
        }
    }
}
